package son.niit.ict;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;

public class About extends Activity implements OnTouchListener {

	ImageView call, mail;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);

		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.about);

		call = (ImageView) findViewById(R.id.call);
		call.setOnTouchListener(this);
		mail = (ImageView) findViewById(R.id.SendSMS);
		mail.setOnTouchListener(this);
	}

	@Override
	public boolean onTouch(View v, MotionEvent event) {

		if (event.getAction() == MotionEvent.ACTION_DOWN) {
			switch (v.getId()) {
			case R.id.call:
				startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:0435574074")));
				break;
			case R.id.SendSMS:
				startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("sms: 0435574074")));

				break;

			default:
				break;
			}
		}

		return true;
	}
}
